home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech's Sprocket™ / SprocketGX / AppSpecific / PreferencesDialogWindow.cp < prev    next >
Encoding:
Text File  |  1994-10-17  |  936 b   |  44 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        PreferencesDialogWindow.cp
  3.  
  4.     Contains:    A simple dialog window recipe
  5.                 
  6.     Written by: Dave Falkenburg
  7.     
  8.     Copyright:    © 1993-94 by Dave Falkenburg, all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.      
  12.  */
  13.  
  14. #include "PreferencesDialogWindow.h"
  15. #include <Controls.h>
  16.  
  17. TPreferencesDialogWindow::TPreferencesDialogWindow() 
  18.     : TDialogWindow(kPreferencesDialogTemplateID)
  19. {
  20.     //    Because TDialogWindow::TDialogWindow has already created the dialog,
  21.     //    this is a great place to grab settings & setup the contents of the
  22.     //    dialog.
  23.     //
  24.     //    Of course, if you do this you probably want to mark the DLOG
  25.     //    as not initially visible, then call ShowWindow just before returning.
  26.     //
  27.     //    You should also setup UPPs for any user items in here, too. 
  28. }
  29.  
  30. void TPreferencesDialogWindow::ItemHit(short theItem)
  31. {
  32.     switch (theItem)
  33.     {
  34.         case    ok:
  35.         case    cancel:
  36.             this->Close();
  37.             delete this;
  38.             break;
  39.             
  40.         default:
  41.             break;
  42.     }
  43. }
  44.